package classwork.demo1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

public class JdbcDemo4 {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");

        Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/db2", "root", "root");

        Statement st = connection.createStatement();
        //ResultSet rs = st.executeQuery("Select * from stu");
        st.executeUpdate("insert into stu values ('02','李四','3344')");

      /*  while (rs.next()) {
            System.out.println(rs.getString("id") + "\t" + rs.getString("name") + "\t" + rs.getString("password"));
        }*/
    }
}
